package com.scalar.forecast.salesForecastEntry.actionCommands;

import com.scalar.forecast.commons.Constants;
import com.scalar.forecast.actionCommands.ActionCommand;

/**
 * User: Sujan
 * Date: Jul 13, 2005
 * Time: 4:45:00 PM
 */
public class SalesForecastEntryActionCommandFactory implements Constants
{
    public static ActionCommand getActionCommand( String action )
    {
        if ( ACTION_SEARCH.equalsIgnoreCase( action ) )
        {
            return new SalesForecastEntrySearchCommand();
        }
        if ( ACTION_NEW.equalsIgnoreCase( action ) )
        {
            return new SalesForecastEntryNewCommand();
        }
        if ( ACTION_SAVE.equalsIgnoreCase( action ) )
        {
            return new SalesForecastEntrySaveCommand();
        }
        if ( ACTION_CALCULATE_RUNNING_TOTALS.equalsIgnoreCase( action ) )
        {
            return new SalesForecastEntryCalcRunningTotalsCommand();
        }
        if ( ACTION_UPLOAD_VIEW.equalsIgnoreCase( action ) )
        {
            return new SalesForecastUploadViewCommand();
        }
        if ( ACTION_UPLOAD.equalsIgnoreCase( action ) )
        {
            return new SalesForecastUploadCommand();
        } else if( "loadWaterfallXHMTL".equalsIgnoreCase( action ) ) {
            return new SalesForecastWaterfallChartCommand();
        } else if( ACTION_DOWNLOAD.equalsIgnoreCase( action ) ) {
            return new SalesForecastDownloadCommand();
        }

       return null;
   }
}
